package cn.edu.scau.cmi.tangqingning.abstractFactoryMethod.insuranceFactory;

import cn.edu.scau.cmi.tangqingning.abstractFactoryMethod.insuranceAbstract.Accidents;
import cn.edu.scau.cmi.tangqingning.abstractFactoryMethod.insuranceAbstract.Bruise;
import cn.edu.scau.cmi.tangqingning.abstractFactoryMethod.insuranceAbstract.CarDamaged;
import cn.edu.scau.cmi.tangqingning.abstractFactoryMethod.insuranceAbstract.Casualty;

public interface AbstractFactory {
	public static AbstractFactory getFactory(String insuranceName) {
		switch(insuranceName) {
		case "中国人寿保险公司":
			return new PICCInsuranceFactory();
		case "平安保险公司" :
			return new PingAnInsuranceFactory();
		default:
			return null;
	}
	}

	public Bruise CreateBruise();

	public Casualty CreateCasualty();

	public CarDamaged CreateCarDamaged();

	public Accidents CreateAccidents();

}
